<template>
  <div class="content">
    <!-- 大图片 -->
    <div class="toptu" :style="top_img">
      <img src="../assets/image/logo2.png" alt="" />
      <!-- <h3 class="title">去中心化云计算业务一站式服务商</h3>
      <p>致力于成为全球最值得信赖的去中心化计算一站式服务领军者</p> -->
      <el-button type="primary" @click="jump1">查看详情</el-button>
    </div>
    <!-- 中间内容 -->
    <div class="products">
      <div class="gscp">PRODUCT</div>
      <div class="gscphanzi">公司产品</div>
      <div class="proall">
        <div class="probox" v-for="item of product_list" :key="item.id">
          <div class="proboxrow1">
            <img :src="item.cover" alt="" />
            <span>{{ item.name }}</span>
          </div>
          <div class="proboxrow2">
            {{ item.note }}
          </div>
        </div>
      </div>
    </div>
    <!-- 底部 -->
    <div class="fangan" :style="back_img">
      <div class="fayingyu">SOLUTIONS</div>
      <div class="fahanzi">解决方案</div>
      <div class="fabox">
        <div class="card" v-for="item of solution" :key="item.id">
          <div class="cardtit">
            {{ item.category_name }}
          </div>
          <div class="cardneirong">
            {{ item.brief }}
          </div>

          <el-button type="primary" @click="jump1">更多详情</el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      top_img: { background: '' },
      back_img: { background: '' },
      product_list: [],
      solution: []
    }
  },
  mounted() {
    this.getIndexInfo()
  },
  methods: {
    async getIndexInfo() {
      const res = await this.axios.get('/api/bdweb/index')
      console.log(res.data.data)
      this.top_img.background = `url(${res.data.data.img.top_img})`
      this.back_img.background = `url(${res.data.data.img.back_img})`
      this.product_list = res.data.data.product_list
      this.solution = res.data.data.solution.slice(0, 3)
    },
    jump1() {
      this.$router.push('/fangan')
    }
  }
}
</script>

<style scoped>
a {
  text-decoration: none;
  color: #ffffff;
}

.router-link-active {
  text-decoration: none;
}
.content {
  width: 1920px;
}
.toptu {
  width: 1920px;
  height: 750px;
  background: no-repeat top left;
  background-size: 100% 100%;
  position: relative;
}
.toptu img {
  width: 213px;
  height: 92px;
  position: absolute;
  top: 217px;
  left: 218px;
}
.toptu .title {
  position: absolute;
  top: 334px;
  left: 218px;
  font-size: 50px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  color: #ffffff;
  line-height: 30px;
  width: 800px;
}
.toptu p {
  position: absolute;
  top: 401px;
  left: 217px;
  font-size: 20px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #ffffff;
  line-height: 30px;
}
.toptu .el-button {
  position: absolute;
  left: 217px;
  top: 454px;
  width: 200px;
  height: 66px;
  background: #0594fe;
  border-radius: 10px;
  font-size: 30px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  color: #ffffff;
  line-height: 30px;
}
.products {
  width: 1400px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}
.gscphanzi {
  text-align: center;
  font-size: 60px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #2b2b2b;
  line-height: 23px;
  margin: 128px auto 93px auto;
  z-index: 999;
}
.gscp {
  position: absolute;
  top: 102px;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 60px;
  font-family: Helvetica;
  font-weight: bold;
  color: #cccccc;
  line-height: 23px;
  opacity: 0.6;
  z-index: 1;
}
.proall {
  width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  box-sizing: border-box;
  padding: 0 5px;
}
.probox {
  width: 600px;
  height: 230px;
  background: #ffffff;
  box-shadow: 0px 0px 12px 0px rgba(204, 204, 204, 0.61);
  border-radius: 15px;
  box-sizing: border-box;
  margin-bottom: 82px;
  padding: 30px 20px;
}
.proboxrow1 {
  display: flex;
  align-items: center;
}
.proboxrow1 > img {
  width: 40px;
  height: 40px;
}
.proboxrow1 > span {
  padding-left: 12px;
  font-size: 24px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  color: #2b2b2b;
  line-height: 23px;
}
.proboxrow2 {
  padding-left: 50px;
  font-size: 20px;
  font-family: Microsoft YaHei;
  font-weight: 300;
  color: #2b2b2b;
  line-height: 30px;
  margin-top: 24px;
}
.fangan {
  width: 1920px;
  height: 852px;
  background: no-repeat top left;
  background-size: 100% 100%;
  position: relative;
  overflow: hidden;
}
.fayingyu {
  width: 346px;
  height: 45px;
  font-size: 60px;
  font-family: Helvetica;
  font-weight: bold;
  color: #cccccc;
  line-height: 23px;
  opacity: 0.6;
  position: absolute;
  top: 40px;
  left: 787px;
}
.fahanzi {
  position: absolute;
  top: 66px;
  left: 840px;
  width: 240px;
  height: 59px;
  font-size: 60px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #ffffff;
  line-height: 23px;
}
.fabox {
  margin: 207px auto;
  width: 1466px;
  display: flex;
  justify-content: space-between;
}
.card {
  width: 400px;
  height: 500px;
  background: #ffffff;
  box-shadow: 0px 0px 12px 0px rgba(204, 204, 204, 0.61);
  opacity: 0.8;
  border-radius: 15px;
  margin: 50px auto;
  overflow: hidden;
  position: relative;
}
.cardtit {
  width: 150px;
  height: 28px;
  font-size: 30px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  color: #2b2b2b;
  line-height: 23px;
  margin: 50px 50px 30px 50px;
}
.cardneirong {
  font-size: 20px;
  font-family: Microsoft YaHei;
  font-weight: 300;
  color: #2b2b2b;
  line-height: 30px;
  margin: 0 50px 30px 50px;
  word-wrap: break-word;
}
.el-button {
  width: 240px;
  height: 76px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  font-size: 30px;
  color: #ffffff;
  position: absolute;
  bottom: 54px;
  left: 80px;
}
</style>
